home *** CD-ROM | disk | FTP | other *** search
- <!--- This example shows how to use ACos --->
-
- <HTML>
-
- <HEAD>
- <TITLE>
- ACos Example
- </TITLE>
- </HEAD>
-
- <BASEFONT FACE="Arial, Helvetica" SIZE=2>
-
- <BODY bgcolor="#FFFFD5">
-
- <H3>ACos Example</H3>
-
- <!--- output its arccosine value --->
- <CFIF IsDefined("form.CosNum")>
- <CFIF IsNumeric(form.CosNum)>
- <CFIF form.CosNum LESS THAN OR EQUAL TO 1>
- <CFIF form.CosNum GREATER THAN OR EQUAL TO -1>
- ACos(<CFOUTPUT>#form.CosNum#</CFOUTPUT>) = <CFOUTPUT>#ACos(form.cosNum)# Radians</CFOUTPUT>
- <BR>
- or
- <BR>
- ACos(<CFOUTPUT>#form.CosNum#</CFOUTPUT>) = <CFOUTPUT>#Evaluate(ACos(form.cosNum) * 180/PI())# Degrees</CFOUTPUT>
- <CFELSE>
- <!--- if it is empty, output an error message --->
- <H4>Please enter a number between -1 and 1</H4>
- </CFIF>
- <CFELSE>
- <!--- if it is empty, output an error message --->
- <H4>Please enter a number between -1 and 1</H4>
- </CFIF>
- </CFIF>
- </CFIF>
-
- <FORM ACTION="acos.cfm" METHOD="POST">
- <P>Type in a number to get its arccosine in Radians and Degrees.
- <BR><INPUT TYPE="Text" NAME="cosNum" SIZE="25">
-
- <P><INPUT TYPE="Submit" NAME=""> <INPUT TYPE="RESET">
-
- </FORM>
-
- </BODY>
-
- </HTML>
-